use axum::Json;
use serde::{Deserialize, Serialize};

#[derive(Debug, Deserialize)]
pub struct LoginRequest {
    pub username: String,
    pub password: String,
}

#[derive(Debug, Serialize)]
pub struct LoginResponse {
    pub token: String,
    pub username: String,
}

pub async fn login(Json(req): Json<LoginRequest>) -> Json<LoginResponse> {
    // TODO: Implement JWT authentication
    Json(LoginResponse {
        token: "dummy_token".to_string(),
        username: req.username,
    })
}
